package com.socket;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;

public class Client {

    public static final int IP_PORXY=18080;

    public static final String IP="127.0.0.1";
    public static void main(String[] args) throws Exception {

        System.out.println("Client ....start");

        Socket client=new Socket(IP,IP_PORXY);

        BufferedReader br=new BufferedReader(new InputStreamReader(client.getInputStream()));
        System.out.println("Client ....begin");

        String data=br.readLine();
        PrintWriter pw  = new PrintWriter(client.getOutputStream());
        pw.write("Hello Server!");
        pw.flush();
        System.out.println("Client ....start");

        pw.close();
        br.close();
        client.close();

    }

}
